<!-- 系统字典首页 -->
<template>

  <div class="app-container">
    <!-- 左侧 菜单列表-->
    <el-row :gutter="15">
      <el-col :md="24" :lg="10" style="margin-bottom: 10px">
        <el-card class="box-card" style="height: 100% ">
          <div slot="header" class="clearfix">
            <span>字典列表</span>
          </div>
          <LeftIndex style="padding: 1px" @selectedChanged="selectedChanged" />
        </el-card>
      </el-col>
      <!-- 右侧 菜单详情-->
      <el-col :md="24" :lg="14">
        <el-card class="box-card" style="height: 100%">
          <div slot="header" class="clearfix">
            <span v-if="parentId" style="color: #ff4949">{{ parentName }}：</span><span>字典详情</span>
          </div>
          <div v-if="!parentId">
            <div class="my-code">请先选择字典</div>
          </div>
          <div v-else>
            <RightIndex style="padding: 1px" :parent-id="parentId" :dict-label="dictLabel" />
          </div>

        </el-card>
      </el-col>
    </el-row>

  </div>
</template>
<!-- 系统字典 首页-->
<script>
import LeftIndex from './leftIndex'
import RightIndex from './rightIndex'
export default {
  name: 'SysDict',
  components: {
    LeftIndex,
    RightIndex
  },
  data() {
    return {
      parentId: '',
      parentName: '',
      dictLabel: ''
    }
  },
  methods: {
    selectedChanged(parentId, parentName, dictLabel) {
      this.parentId = parentId
      this.parentName = parentName
      this.dictLabel = dictLabel
    }
  }

}
</script>

<style scoped>

</style>
